package com.m3958.firstgwt.client.place;

import com.m3958.firstgwt.client.MyPlace;
import com.m3958.firstgwt.client.types.ViewNameEnum;

public class WebHostEditPlace extends MyPlace{
	
	private String siteId;
	
	private String hostId;
	
	public WebHostEditPlace(String siteAndHostId){
		String[] ss = siteAndHostId.split(",");
		this.siteId = ss[0];
		if(ss.length > 1)this.hostId = ss[1];
	}
	
	public WebHostEditPlace(String siteId,String hostId){
		this.siteId = siteId;
		this.hostId = hostId;
	}


	@Override
	public String getToken() {
		return ViewNameEnum.WEBHOST_EDIT.toString().toLowerCase() + "/" + siteId + "," + hostId;
	}

	public String getSiteId() {
		return siteId;
	}

	public void setSiteId(String siteId) {
		this.siteId = siteId;
	}

	public String getHostId() {
		return hostId;
	}

	public void setHostId(String hostId) {
		this.hostId = hostId;
	}

}
